﻿using System.Data;
using System;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "IEditInsBook" here, you must also update the reference to "IEditInsBook" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IDoiSo
    {
        //[OperationContract]
        //int EditInsBook_Using(int EditInsBookID);

        [OperationContract]
        DataSet HRM_Doiso_GetAll();

        [OperationContract]
        HRM_DoisoInfo HRM_Doiso_GetInfo(int HRM_DoisoID);

        [OperationContract]
        DataSet HRM_Doiso_GetList(out int ItemCount, int _month, int _year, int branchID, int departmentID,int currentPage, int pageSize);

        [OperationContract]
        int HRM_Doiso_Insert(HRM_DoisoInfo eInfo);

        [OperationContract]
        bool HRM_Doiso_Update(HRM_DoisoInfo eInfo);

        [OperationContract]
        bool HRM_Doiso_Delete(int HRM_DoisoID);

        [OperationContract]
        bool HRM_DoiSo_DeleteStringID(string strHRM_DoisoEmployeeID, string LoaiDoiSo);

        [OperationContract]
        DataSet HRM_Doiso_Excel(DateTime fromDate, DateTime toDate,int BranchID);

        [OperationContract]
        bool HRM_Doiso_CapNhatDeNghiCapSo(int BranchID, string LoaiDoiSo, string strEmployeeID,string SoSoDauDS,DateTime toDate);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class HRM_DoisoInfo
    {
        int _doiso_ID;
        [DataMember]
        public int doiso_ID
        {
            get { return _doiso_ID; }
            set { _doiso_ID = value; }
        }

        int _doiso_branchID;
        [DataMember]
        public int doiso_branchID
        {
            get { return _doiso_branchID; }
            set { _doiso_branchID = value; }
        }
        int _doiso_employeeID;
        [DataMember]
        public int doiso_employeeID
        {
            get { return _doiso_employeeID; }
            set { _doiso_employeeID = value; }
        }
        string _doiso_sosotam;
        [DataMember]
        public string doiso_sosotam
        {
            get { return _doiso_sosotam; }
            set { _doiso_sosotam = value; }
        }
        string _doiso_sosodoi;
        [DataMember]
        public string doiso_sosodoi
        {
            get { return _doiso_sosodoi; }
            set { _doiso_sosodoi = value; }
        }
       
        DateTime _doiso_ngaynhap;
        [DataMember]
        public DateTime doiso_ngaynhap
        {
            get { return _doiso_ngaynhap; }
            set { _doiso_ngaynhap = value; }
        }
        string _doiso_loai;
        [DataMember]
        public string doiso_loai
        {
            get { return _doiso_loai; }
            set { _doiso_loai = value; }
        }
    }
}
